package tag25_13_08.ExamUndUnterricht;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Java7_TryWithResources {

	public static void main(String[] args) {
		
		
		File file = new File("test.txt");
				
		//try-with-resources:
		
		try( Scanner sc = new Scanner(file) ) {
			System.out.println(sc.nextLine());
		}catch(FileNotFoundException e) {
			System.out.println("Fehler: Datei nich gefunden");
			
		}

		//finally ist da
	}

}
